<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增设备工艺记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-processrecord-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备编号：</label>
                <div class="col-sm-8">
                    <input name="equipmentId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备维护日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="maintainDate" class="form-control" placeholder="请输入设备维护日期" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">工艺名称：</label>
                <div class="col-sm-8">
                    <input name="processName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">炉数：</label>
                <div class="col-sm-8">
                    <input name="heatsNumber" class="form-control" type="text" onkeyup="value=value.replace(/[^1-9]/g,'')" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">程序名：</label>
                <div class="col-sm-8">
                    <input name="programName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">程序名备注：</label>
                <div class="col-sm-8">
                    <input name="programRemark" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">累计厚度：</label>
                <div class="col-sm-8">
                    <input name="accuThickness" class="form-control" type="text" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "equipment/processrecord"
        $("#form-processrecord-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-processrecord-add').serialize());
            }
        }

        $("input[name='maintainDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>